//#include "JNode.h"
//#include "JSerialize.h"
//#include "JFile.h"
//
//JNode::JNode(void)
//{
//}
//
//JNode::~JNode(void)
//{
//}
//
///*
//data structure:
//int : classSize
//int : selfIndex
//int : parentIndex
//vector<int> : childrenIndex
//JFile : data
//*/
//int JNode::Serialize(std::iostream& strea)
//{
//	int selfSize = 0;
//	int classSize = 0;
//	selfSize += JSerialize::PutInt(strea,classSize);
//	classSize += JSerialize::Serialize(strea,this->selfIndex);
//	classSize += JSerialize::Serialize(strea,this->parentIndex);
//	classSize += JSerialize::Serialize(strea,this->childrenIndex);
//	classSize += (this->data.get())->Serialize(strea);
//	selfSize += classSize;
//	//strea.seekg(0,std::ios::beg);
//	//strea.write((char*)&classSize,sizeof(int));
//	JSerialize::Verify(strea,classSize,selfSize * -1);
//	return selfSize;
//}
//
//int JNode::ReSerialize(std::iostream& strea)
//{
//	int classSize = JSerialize::GetInt(strea);
//	this->selfIndex = JSerialize::ReSerializeInt(strea);
//	this->parentIndex = JSerialize::ReSerializeInt(strea);
//	this->childrenIndex = JSerialize::ReSerializeIntArray(strea);
//	//warning:this can't use virtual JFile::ReSerialize
//	JFile* pFile = new JFile;
//	pFile->ReSerialize(strea);
//	this->data.reset(pFile);
//	return classSize + sizeof(int);
//}
